\(\int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx\) [1481]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 155 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {35 b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d} \]

[Out]

35/8*b*arctanh(sin(d*x+c))/d+1/2*a*cos(d*x+c)^2/d-3*a*ln(cos(d*x+c))/d-3/2*a*sec(d*x+c)^2/d+1/4*a*sec(d*x+c)^4
/d-35/8*b*sin(d*x+c)/d-35/24*b*sin(d*x+c)^3/d-7/8*b*sin(d*x+c)^3*tan(d*x+c)^2/d+1/4*b*sin(d*x+c)^3*tan(d*x+c)^
4/d

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2913, 2670, 272, 45, 2672, 294, 308, 212} \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {a \cos ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {3 a \sec ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}+\frac {35 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {35 b \sin (c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d} \]

[In]

Int[Sin[c + d*x]^2*(a + b*Sin[c + d*x])*Tan[c + d*x]^5,x]

[Out]

(35*b*ArcTanh[Sin[c + d*x]])/(8*d) + (a*Cos[c + d*x]^2)/(2*d) - (3*a*Log[Cos[c + d*x]])/d - (3*a*Sec[c + d*x]^
2)/(2*d) + (a*Sec[c + d*x]^4)/(4*d) - (35*b*Sin[c + d*x])/(8*d) - (35*b*Sin[c + d*x]^3)/(24*d) - (7*b*Sin[c +
d*x]^3*Tan[c + d*x]^2)/(8*d) + (b*Sin[c + d*x]^3*Tan[c + d*x]^4)/(4*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2670

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 2913

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]),
 x_Symbol] :> Dist[a, Int[Cos[e + f*x]^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[Cos[e + f*x]^p*(d*Sin[e +
f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && IntegerQ[n] && ((LtQ[p, 0]
&& NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] || LtQ[p + 1, -n, 2*p + 1])

Rubi steps \begin{align*} \text {integral}& = a \int \sin ^2(c+d x) \tan ^5(c+d x) \, dx+b \int \sin ^3(c+d x) \tan ^5(c+d x) \, dx \\ & = -\frac {a \text {Subst}\left (\int \frac {\left (1-x^2\right )^3}{x^5} \, dx,x,\cos (c+d x)\right )}{d}+\frac {b \text {Subst}\left (\int \frac {x^8}{\left (1-x^2\right )^3} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {a \text {Subst}\left (\int \frac {(1-x)^3}{x^3} \, dx,x,\cos ^2(c+d x)\right )}{2 d}-\frac {(7 b) \text {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{4 d} \\ & = -\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {a \text {Subst}\left (\int \left (-1+\frac {1}{x^3}-\frac {3}{x^2}+\frac {3}{x}\right ) \, dx,x,\cos ^2(c+d x)\right )}{2 d}+\frac {(35 b) \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\sin (c+d x)\right )}{8 d} \\ & = \frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}+\frac {(35 b) \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{8 d} \\ & = \frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}+\frac {(35 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{8 d} \\ & = \frac {35 b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.43 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.12 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {35 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a \left (12 \log (\cos (c+d x))+6 \sec ^2(c+d x)-\sec ^4(c+d x)+2 \sin ^2(c+d x)\right )}{4 d}+\frac {35 b \sec (c+d x) \tan (c+d x)}{8 d}-\frac {35 b \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {35 b \sec (c+d x) \tan ^3(c+d x)}{3 d}-\frac {7 b \sin (c+d x) \tan ^4(c+d x)}{3 d}-\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{3 d} \]

[In]

Integrate[Sin[c + d*x]^2*(a + b*Sin[c + d*x])*Tan[c + d*x]^5,x]

[Out]

(35*b*ArcTanh[Sin[c + d*x]])/(8*d) - (a*(12*Log[Cos[c + d*x]] + 6*Sec[c + d*x]^2 - Sec[c + d*x]^4 + 2*Sin[c +
d*x]^2))/(4*d) + (35*b*Sec[c + d*x]*Tan[c + d*x])/(8*d) - (35*b*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (35*b*Sec
[c + d*x]*Tan[c + d*x]^3)/(3*d) - (7*b*Sin[c + d*x]*Tan[c + d*x]^4)/(3*d) - (b*Sin[c + d*x]^3*Tan[c + d*x]^4)/
(3*d)

Maple [A] (verified)

Time = 1.10 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.14

method result size
derivativedivides \(\frac {a \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(177\)
default \(\frac {a \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(177\)
parallelrisch \(\frac {288 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) a \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-288 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +\frac {35 b}{24}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-288 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a -\frac {35 b}{24}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-603 a \cos \left (2 d x +2 c \right )-108 \cos \left (4 d x +4 c \right ) a +3 a \cos \left (6 d x +6 c \right )-189 b \sin \left (3 d x +3 c \right )-35 b \sin \left (5 d x +5 c \right )+b \sin \left (7 d x +7 c \right )-105 b \sin \left (d x +c \right )-444 a}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(233\)
risch \(3 i a x -\frac {i b \,{\mathrm e}^{3 i \left (d x +c \right )}}{24 d}+\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {13 i b \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {13 i b \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {i b \,{\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}+\frac {6 i a c}{d}+\frac {i \left (24 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+13 b \,{\mathrm e}^{7 i \left (d x +c \right )}+32 i a \,{\mathrm e}^{4 i \left (d x +c \right )}+5 b \,{\mathrm e}^{5 i \left (d x +c \right )}+24 i a \,{\mathrm e}^{2 i \left (d x +c \right )}-5 b \,{\mathrm e}^{3 i \left (d x +c \right )}-13 b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}\) \(292\)
norman \(\frac {\frac {22 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {22 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a}{3 d}-\frac {35 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {35 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {329 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {17 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {329 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {35 b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {35 b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {16 a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {3 a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (24 a -35 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}-\frac {\left (24 a +35 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}\) \(310\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^7*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(1/4*sin(d*x+c)^8/cos(d*x+c)^4-1/2*sin(d*x+c)^8/cos(d*x+c)^2-1/2*sin(d*x+c)^6-3/4*sin(d*x+c)^4-3/2*sin(
d*x+c)^2-3*ln(cos(d*x+c)))+b*(1/4*sin(d*x+c)^9/cos(d*x+c)^4-5/8*sin(d*x+c)^9/cos(d*x+c)^2-5/8*sin(d*x+c)^7-7/8
*sin(d*x+c)^5-35/24*sin(d*x+c)^3-35/8*sin(d*x+c)+35/8*ln(sec(d*x+c)+tan(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.96 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {24 \, a \cos \left (d x + c\right )^{6} - 3 \, {\left (24 \, a - 35 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (24 \, a + 35 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 12 \, a \cos \left (d x + c\right )^{4} - 72 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (8 \, b \cos \left (d x + c\right )^{6} - 80 \, b \cos \left (d x + c\right )^{4} - 39 \, b \cos \left (d x + c\right )^{2} + 6 \, b\right )} \sin \left (d x + c\right ) + 12 \, a}{48 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/48*(24*a*cos(d*x + c)^6 - 3*(24*a - 35*b)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(24*a + 35*b)*cos(d*x + c
)^4*log(-sin(d*x + c) + 1) - 12*a*cos(d*x + c)^4 - 72*a*cos(d*x + c)^2 + 2*(8*b*cos(d*x + c)^6 - 80*b*cos(d*x
+ c)^4 - 39*b*cos(d*x + c)^2 + 6*b)*sin(d*x + c) + 12*a)/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**7*(a+b*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.85 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {16 \, b \sin \left (d x + c\right )^{3} + 24 \, a \sin \left (d x + c\right )^{2} + 3 \, {\left (24 \, a - 35 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (24 \, a + 35 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 144 \, b \sin \left (d x + c\right ) - \frac {6 \, {\left (13 \, b \sin \left (d x + c\right )^{3} + 12 \, a \sin \left (d x + c\right )^{2} - 11 \, b \sin \left (d x + c\right ) - 10 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{48 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/48*(16*b*sin(d*x + c)^3 + 24*a*sin(d*x + c)^2 + 3*(24*a - 35*b)*log(sin(d*x + c) + 1) + 3*(24*a + 35*b)*log
(sin(d*x + c) - 1) + 144*b*sin(d*x + c) - 6*(13*b*sin(d*x + c)^3 + 12*a*sin(d*x + c)^2 - 11*b*sin(d*x + c) - 1
0*a)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.87 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {16 \, b \sin \left (d x + c\right )^{3} + 24 \, a \sin \left (d x + c\right )^{2} + 3 \, {\left (24 \, a - 35 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (24 \, a + 35 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 144 \, b \sin \left (d x + c\right ) - \frac {6 \, {\left (18 \, a \sin \left (d x + c\right )^{4} + 13 \, b \sin \left (d x + c\right )^{3} - 24 \, a \sin \left (d x + c\right )^{2} - 11 \, b \sin \left (d x + c\right ) + 8 \, a\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{48 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/48*(16*b*sin(d*x + c)^3 + 24*a*sin(d*x + c)^2 + 3*(24*a - 35*b)*log(abs(sin(d*x + c) + 1)) + 3*(24*a + 35*b
)*log(abs(sin(d*x + c) - 1)) + 144*b*sin(d*x + c) - 6*(18*a*sin(d*x + c)^4 + 13*b*sin(d*x + c)^3 - 24*a*sin(d*
x + c)^2 - 11*b*sin(d*x + c) + 8*a)/(sin(d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 12.62 (sec) , antiderivative size = 346, normalized size of antiderivative = 2.23 \[ \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {3\,a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {-\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{4}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{6}+6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {329\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{12}+16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-17\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {329\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {35\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (3\,a+\frac {35\,b}{8}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (3\,a-\frac {35\,b}{8}\right )}{d} \]

[In]

int((sin(c + d*x)^7*(a + b*sin(c + d*x)))/cos(c + d*x)^5,x)

[Out]

(3*a*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (6*a*tan(c/2 + (d*x)/2)^4 - 6*a*tan(c/2 + (d*x)/2)^2 - (35*b*tan(c/2 +
 (d*x)/2))/4 + 16*a*tan(c/2 + (d*x)/2)^6 + 16*a*tan(c/2 + (d*x)/2)^8 + 6*a*tan(c/2 + (d*x)/2)^10 - 6*a*tan(c/2
 + (d*x)/2)^12 + (35*b*tan(c/2 + (d*x)/2)^3)/6 + (329*b*tan(c/2 + (d*x)/2)^5)/12 - 17*b*tan(c/2 + (d*x)/2)^7 +
 (329*b*tan(c/2 + (d*x)/2)^9)/12 + (35*b*tan(c/2 + (d*x)/2)^11)/6 - (35*b*tan(c/2 + (d*x)/2)^13)/4)/(d*(tan(c/
2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 - 3*tan(c/2 + (d*x)/2)^6 - 3*tan(c/2 + (d*x)/2)^8 + 3*tan(c/2 + (d*x)/
2)^10 + tan(c/2 + (d*x)/2)^12 - tan(c/2 + (d*x)/2)^14 - 1)) - (log(tan(c/2 + (d*x)/2) - 1)*(3*a + (35*b)/8))/d
 - (log(tan(c/2 + (d*x)/2) + 1)*(3*a - (35*b)/8))/d